package object;

/**
 * @Author: Miyako
 * @Date: 2024-07-12-16:01
 * @Description:测试object中toSting和equals方法
 */
public class Demo {
    public static void main(String[] args) {
        Point p = new Point(1,2);
        Point p1 = new Point(1,2);
        System.out.println(p.equals(p1));
        String S = p.toString();
        System.out.println(S);
        System.out.println(p);
        String SS = "呃呃呃"+p;
        System.out.println(SS);
        System.out.println(S.equals(SS));
        Integer i = 10;//自动装箱
        int s =i;  //自动拆箱
        Integer i1 = Integer.valueOf(6);
        System.out.println(i.equals(s));
        System.out.println(i==s);
        double d = 1.0;
        Double d1 = Double.valueOf(d);
        Double d2 = Double.valueOf(d);
        System.out.println(d1==d2);
        double d3 = i1.doubleValue();



    }
}

